Re: [SQL] DISTINCT count(*), possible? - Mailing list pgsql-sql

From Herouth Maoz
Subject Re: [SQL] DISTINCT count(*), possible?
Date
Msg-id l03130301b38d2ad5bfaa@[147.233.159.109]
Whole thread Raw
In response to Re: [SQL] DISTINCT count(*), possible?  (Stuart Rison <stuart@ludwig.ucl.ac.uk>)
List pgsql-sql
At 11:55 +0300 on 16/06/1999, Stuart Rison wrote:


> A previously posted work-around (search the GENERAL mailing list with
> 'count', 'DISTINCT' and 'Herouth') adapted to your query is:
>
> SELECT count(*)
> FROM aro t1
> WHERE int( oid ) = (
>     SELECT min( int( t2.oid ) )
>     FROM test t2
>     WHERE t2.address1 = t1.address1
> );

Since I apparently own the copyright for this solution :-)

The internal FROM should read "FROM aro t2", not "FROM test t2".

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma




pgsql-sql by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Postgres mailing lists
Next
From: Vince Vielhaber
Date:
Subject: Re: [HACKERS] Postgres mailing lists